package com.yss.sofa.report.engine.cell.visible.extendable;

import org.codehaus.jackson.map.annotate.JsonDeserialize;

import com.yss.sofa.report.engine.Const;
import com.yss.sofa.report.engine.cell.ReportCell;
import com.yss.sofa.report.engine.json.SeriesDeserializer;
import com.yss.sofa.report.engine.series.Series;


public class ChartCell extends ExtendableCell {
	private static final long serialVersionUID = 1925709664488522531L;
	@JsonDeserialize(using=SeriesDeserializer.class)
	private Series series;
	protected void init() {
		super.init();
		this.type=Const.REPORT_CELL_TYPE_CHART;
		this.dataType=Const.CELL_DATA_TYPE_IMG;
	}
	public void assignTo(ReportCell cell){
		ChartCell _=(ChartCell)cell;
		super.assignTo(_);
		_.series=this.series.create();
	}
	public ChartCell create(){
		ChartCell _=new ChartCell();
		this.assignTo(_);
		return _;
	}
	public Series getSeries() {
		return series;
	}
	public void setSeries(Series series) {
		this.series = series;
	}
	public int getDataType(){
		return Const.CELL_DATA_TYPE_IMG;
	}
	public void setDataType(int dataType){}
}